﻿using System;
using System.Collections.Generic;
using System.Text;

using Microsoft.Xna.Framework;

namespace Daybreak.Core.Mathematics
{
    public static class Distance
    {
        #region PointPlaneDistance
        public static float PointPlaneDistance(Vector3 pt, Plane plane)
        {
            return Vector3.Dot(plane.Normal, pt) + plane.D;
        }

        public static float PointPlaneDistance(ref Vector3 pt, ref Plane plane)
        {
            float num0;
            Vector3.Dot(ref plane.Normal, ref pt, out num0);
            return plane.D + num0;
        }
        #endregion
    }
}
